package com.joven.product.service.infrastructure.persistence.db.dao.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.joven.product.service.infrastructure.persistence.db.dao.ProductDetailDao;
import com.joven.product.service.infrastructure.persistence.db.mapper.ProductDetailMapper;
import com.joven.product.service.infrastructure.persistence.db.entity.ProductDetailDO;
import org.springframework.stereotype.Service;

/**
 * 商品详情接口实现
 *
 * @author Joven
 * @date 2022-01-06 18:21:27
 */
@Service
public class ProductDetailDaoImpl extends ServiceImpl<ProductDetailMapper, ProductDetailDO> implements ProductDetailDao {
    @Override
    public ProductDetailDO getByProductId(Long productId) {
        return getOne(Wrappers.<ProductDetailDO>lambdaQuery().eq(ProductDetailDO::getProductId, productId));
    }
}
